package com.jiyun.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.PageList;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jiyun.pojo.ThTour;
import com.jiyun.mapper.ThTourMapper;
import com.jiyun.service.IThTourService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import common.dtos.PageDto;
import common.dtos.PageRequestDto;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author usian
 * @since 2022-10-27
 */
@Service
public class ThTourServiceImpl extends ServiceImpl<ThTourMapper, ThTour> implements IThTourService {

    @Override
    public List<ThTour> findPage(PageDto dto) {

        Page<ThTour> page=new Page<>(dto.getPage(),dto.getSize());
        Page<ThTour> page1 = this.page(page);
        System.out.println(page1.getRecords());
        return page1.getRecords();
    }
}
